<!--#include file="Config.asp" -->
<!--#include file="HeadTop.asp"-->


<%
userid=session("AnyPIM_userID")
colspanNum=6

keyWords=Trim(request("keyWords")) '关键字
GID=Trim(request("gid")) '选择组id号

if GID="" then
 GID=0
end if

page=abs(int(request("page"))) '当前页

if trim(page)="" or page<=1 then
 page=1
end if

%>


<table class="table table-condensed">
<TR>
<TD noWrap vAlign='top'>


<!--组显示结束 -->
<table class="table table-condensed table-bordered">
<form action='ContactList.asp' method='post' name='formcheck'>
<tr bgcolor='#ccff99'>
<td width='30'>选择</td>
<td>编辑</td>
<td>姓名[点击查看详情]</td>
<td>性别</td>
<td>西历生日</td>
<td>备注</td>
</tr>
<!--通讯录Content显示开始-->
<%
sql="select * from Contact_info where userid='"&userid&"' "
if GID<>0 then
sql=sql&" and gid='"&GID&"' "
End If
If Trim(request("keyWords"))<>"" then
sql=sql&" and name like '%"&keyWords&"%' "
end If
sql=sql&"order by id desc"
rs.open sql,conn,1,1

if rs.eof or rs.bof then %>
<tr  bgcolor='#ffffff'>
  <td align='center' colspan="<%=colspanNum%>"><BR>还没有记录哦！<BR><BR></td>
</tr>
<%else%>
<%
rs.pagesize=10
rs.absolutepage=page
pagecount=rs.pagecount
i=0
if int(page)>=int(rs.pagecount) then
page=rs.pagecount
end if

if page=1 then
hxxx="上一页 | "
else
hxxx="<a href=?key="&key&"&gid="&GID&"&page="&page-1&">上一页</a> | "
end if

if int(page)>=int(rs.pagecount) then
 hxxx=hxxx&" 下一页 | "
else
 hxxx=hxxx&"<a href=?key="&key&"&gid="&GID&"&page="&page+1&">下一页</a>|"
end if
do while not rs.eof
%>

<tr bgcolor='#ffffff'>
  <td><input name=chkuser type=checkbox value=<%=rs("id")%>></td>
  <td><a href="ContactEdit.asp?id=<%=int(rs("id"))%>">编辑</a></td>
  <td><a  href="ContactDetail.asp?id=<%=rs("id")%>"><%=rs("name")%></a></td>
  <td><%=GetSex(int(rs("sex")))%></td>
  <td><%=int(rs("birthMon"))%>月<%=int(rs("birthDay"))%>日</td>
  <td><%=trim(rs("remark"))%></td>
</tr>
<%rs.movenext
i=i+1
if i=rs.pagesize then exit do
loop
 end if
 rs.close
 %>
<!--通讯录Content显示结束 -->
<!-- 操作 -->

<tr bgcolor='#f6f6f6'>
<td colspan='<%=colspanNum%>'>
<%=hxxx%>共<%=pagecount%>页</td>
</tr>

</form>
</table>



</td>
<TD noWrap vAlign='top' width='10'></TD>
<TD noWrap vAlign='top' width='200'>
	<!-- 分组开始 -->
	<!--#include file=IncContactGroup.asp -->
	<!-- 分组结束 -->
</TD>
</td>
</tr>
</table>

<!--#include file=Foot.asp -->
